using System;
namespace Microsoft.Phone.Controls
{
	internal class AmPmDataSource : DataSource
	{
		protected override DateTime? GetRelativeTo(DateTime relativeDate, int delta)
		{
			int num = 24;
			int num2 = relativeDate.get_Hour() + delta * (24 / 2);
			if (num2 >= 0 && num > num2)
			{
				return new DateTime?(new DateTime(relativeDate.get_Year(), relativeDate.get_Month(), relativeDate.get_Day(), num2, relativeDate.get_Minute(), 0));
			}
			return default(DateTime?);
		}
	}
}
